home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 27
/
Mac Magazin and MacEasy Magazine CD - Issue 27.iso
/
Grafik & Text
/
sulu_v1
/
Samples
/
PCCTS Digest - 20⁄01⁄95
< prev
next >
Wrap
Internet Message Format
|
1995-01-20
|
6KB
From: parrt@garage.ecn.purdue.edu (Terence J Parr)
Subject: Re: Token label bug when using LL(2) lookahead
Date: 13 Jan 1995 21:36:27 GMT
Kari,
Actually, I think that your trouble likes with -gk option which I
just "fixed" for 1.31. I'm looking into it now. Try w/o it as a
quick fix.
Terence
WAIT! Just found the problem! Argh. Unfortunately, I have no
easy solution. Essentially the internal LA() function (lookahead token
type) is cool, but the LT() (lookahead token ptr) function is screwed
up for -gk option. Argh. I'll look more deeply later. I think
I know how to fix it.
From: grano@cc.Helsinki.FI (Kari Grano)
Subject: Re: Token label bug when using LL(2) lookahead
Date: 16 Jan 1995 11:28:40 +0200
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
In article <3f6ror$i9u@mozo.cc.purdue.edu>,
Terence J Parr <parrt@garage.ecn.purdue.edu> wrote:
>>
>>Kari,
>>
>>Actually, I think that your trouble likes with -gk option which I
>>just "fixed" for 1.31. I'm looking into it now. Try w/o it as a
>>quick fix.
Wow, that seems to fix it. Thanks!
>>WAIT! Just found the problem! Argh. Unfortunately, I have no
>>easy solution. Essentially the internal LA() function (lookahead token
Ok, I can live without interactivity for a while :-)
Thank you for the quick answer. Keep up the great work!
Regards,
Kari.
--
Kari Grano grano@cs.helsinki.fi Hey, my opinions are just mine..
"I've got a thousand telephones that don't ring" - R.Z.
From: tory@cs.montana.edu (Tory Eneboe)
Subject: column problems with C++ version of PCCTS
Date: 13 Jan 1995 21:19:28 GMT
I am having problems retreiving the token column information when using the
C++ version of PCCTS. For example, how would I retrieve the end column
position of the token ID in the example below. I know I should use the
function endcol() (a method in the class DLGLexerBase), but I can't seem to
get it to work. Please help!!!
________________________________________________________________________________
#include <stream.h>
#include "tokens.h"
#include "CParser.h"
#include "DLGLexer.h"
typedef ANTLRCommonToken ANTLRToken;
main(int argc, char *argv[])
{
DLGFileInput in(stdin);
DLGLexer scan(&in, 2000);
ANTLRTokenBuffer pipe(&scan, 2);
ANTLRToken aToken;
scan.setToken(&aToken);
scan.trackColumns(); // Keep track of the token column information.
CParser parser(&pipe);
parser.init();
parser.start();
}
#token ID "[a-z]"
class CParser
{
start : "\(", ID "\)" // How do I get the end column position for ID???
;
}
--
--------------------------------------------------------------------------------
Tory Eneboe
"tory@fubar.cs.montana.edu"
--------------------------------------------------------------------------------
From: pollart@univ-lille1.fr (Michel Pollart)
Subject: looking for Install Pccts Dos version
Date: Mon, 16 Jan 1995 18:52:45
X-Newsreader: Trumpet for Windows [Version 1.0 Rev A]
Is some one can give me a Host adresse where I can find
a Pccts version for dos
Thanks !
ornato@onera.fr said:
> I'm writting to the mailing-list because my
> news-server is down, please forgive me.
> I've got a grammar file that is becoming rather large, with
> a lot of "C" actions. As a result, it takes a lot of time to
> compile the antlr-generated "C" file (I'm using GCC), even if I just
> changed a comma.
> Would it be possible to generate several "C" files from one
> grammar, each "C" file matching a user-specified set of rules,
> so that changing a rule will only re-generate the right "C" file ?
> Another question: When will sorcerer next version be released ?
> Thanks.
> Manuel ORNATO
Actually, just do as I do and split your grammar file into
several .g's. Have one (the first one in the list to antlr) have the
#header info. Essentially antlr will concatenate them together in
order to produce the scanner and such, but will create a new .c for
every .g.
This obviously means makefile changes (but not that many.)
--
3of5@cube.bit.edu -- 3 of 5 -- Borg Institute of Technology
Data (puzzled) : Aye, sir. Releasing frozen hydrogen-oxygen compound
through ship's environmental systems, Captain.
Picard (shivering) : YOU IDIOT! I SAID "MAKE IT SO"! (stomps to ready room)
Manuel,
ANTLR allows you to split up the grammar into multiple files, but
will still write each one out to disk. This is because changing
a rule anywhere may affect every other rule. Until ANTLR becomes
a LOT smarter, this kind of nice compilation won't happen.
A way around this is to have the grammar simply call a bunch of
generic functions like helloJustFoundThisInGrammar(args). That way
you can change the actions without forcing a recompile. This makes
the grammar easier to read also.
Another sorcerer release (beyond 1.00B13) should be out in a month
or two.
Terence
I'm writting to the mailing-list because my
news-server is down, please forgive me.
I've got a grammar file that is becoming rather large, with
a lot of "C" actions. As a result, it takes a lot of time to
compile the antlr-generated "C" file (I'm using GCC), even if I just
changed a comma.
Would it be possible to generate several "C" files from one
grammar, each "C" file matching a user-specified set of rules,
so that changing a rule will only re-generate the right "C" file ?
Another question: When will sorcerer next version be released ?
Thanks.
Manuel ORNATO